Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to passing variables as command-line options #35

Closed
wants to merge 4 commits into from

Conversation

andrioni
Copy link
Contributor

This implements the option to pass variables to playbooks using command-line arguments.

  • -var key1=val1 gets passed as the variable key1 having the value val1.
  • Multiple key-value pairs can be passed by just repeating -var: -var key1=val1 -var key2=val2
  • Command-line variables override those defined in the playbooks.
  • The first equals sign (=) found marks the separation between key and values: this means a value can contain as many equals sign it wants to, but the key can't.

@alexanderdean
Copy link
Member

Awesome implementation Alessandro! Thanks so much, scheduling.

@andrioni has signed the CLA.

@andrioni
Copy link
Contributor Author

Happy to help!

@alexanderdean
Copy link
Member

How are you finding Golang?

@andrioni
Copy link
Contributor Author

This was my first experience writing anything other than a Hello World, and it was pretty nice.
I like the straightforward simplicity, and it feels refreshing to do something so down-to-earth after spending some months in Scala-land.

@neekipatel
Copy link

Hi, any idea when you will release the next version. Waiting for this to be merged as writing the db creds for every playbook is a pain.

@alexanderdean
Copy link
Member

Not too long now @neekipatel - thanks for your patience...

@jbeemster jbeemster changed the title Add support to passing variables as command-line options, solve #12 Add support to passing variables as command-line options Oct 30, 2015
@jbeemster jbeemster closed this in 10f0779 Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants